package com.example.tse.rbhttpservice.service.member.model;

import java.util.List;
import java.util.ArrayList;
import com.example.tse.rbhttpservice.service.RudderResponse;


//import com.rbyair.services.member.model.MemberSurveyGetQuestions;
/**
 * 获取小调研问卷内容，仅获取一条有效调研问卷
 * @author wliu
 * edit tse
 */
public class MemberSurveyGetResponse extends RudderResponse{
    
    private String surveryId = "";
		
    
    private String title = "";
		
    
    private String desc = "";
		
    
    private List<MemberSurveyGetQuestions> questions = new ArrayList<MemberSurveyGetQuestions>();
		
	
    /**
     * @return surveryId
     */	
    public String getSurveryId() { 
	    return this.surveryId;
    };
	
	/**
     * @return surveryId
     */	
    public void setSurveryId(String surveryId) { 
        this.surveryId = surveryId;
    };
    
    /**
     * @return title
     */	
    public String getTitle() { 
	    return this.title;
    };
	
	/**
     * @return title
     */	
    public void setTitle(String title) { 
        this.title = title;
    };
    
    /**
     * @return desc
     */	
    public String getDesc() { 
	    return this.desc;
    };
	
	/**
     * @return desc
     */	
    public void setDesc(String desc) { 
        this.desc = desc;
    };
    
    /**
     * @return questions
     */	
    public List<MemberSurveyGetQuestions> getQuestions() { 
	    return this.questions;
    };
	
	/**
     * @return questions
     */	
    public void setQuestions(List<MemberSurveyGetQuestions> questions) { 
        this.questions = questions;
    };
    
	
        
    private static void filterFor(MemberSurveyGetQuestions member) {
        if (member.getId() == null) {
            member.setId("");
        }
        if (member.getTitle() == null) {
            member.setTitle("");
        }
        if (member.getType() == null) {
            member.setType("");
        }
        if (member.getOpt1() == null) {
            member.setOpt1("");
        }
        if (member.getOpt2() == null) {
            member.setOpt2("");
        }
        if (member.getOpt3() == null) {
            member.setOpt3("");
        }
        if (member.getOpt4() == null) {
            member.setOpt4("");
        }
        if (member.getOpt5() == null) {
            member.setOpt5("");
        }
    }
        
    public static void filter(MemberSurveyGetResponse member) {
        if (member.getSurveryId() == null) {
            member.setSurveryId("");
        }
        if (member.getTitle() == null) {
            member.setTitle("");
        }
        if (member.getDesc() == null) {
            member.setDesc("");
        }
        if (member.getQuestions() == null) {
            member.setQuestions(new ArrayList<MemberSurveyGetQuestions>());
        } else {
            for (MemberSurveyGetQuestions item : member.getQuestions()) {
                filterFor(item);
            }
        }
    }
}
